package com.example.administrator.familfinalcialmanagement.util.dialog;

import android.content.Context;
import android.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.view.View;

import com.example.administrator.familfinalcialmanagement.R;
import com.example.administrator.familfinalcialmanagement.databinding.DialogPhotoBinding;
import com.example.administrator.familfinalcialmanagement.util.LogUtil;
import com.example.administrator.familfinalcialmanagement.util.listener.OnBHClickListener;

/**
 * Created by Administrator
 * on 2019/2/21.
 */

public class PhotoDialog extends BaseDialog {

    Context context;
    DialogPhotoBinding binding ;
    OnBHClickListener onBHClickListener;

    public PhotoDialog(Context context) {
        super(context);
        this.context = context;
        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_photo,null,false);
        binding.setDialog(this);
        setContentView(binding.getRoot());
    }

    public void setOnBHClickListener(OnBHClickListener onBHClickListener) {
        this.onBHClickListener = onBHClickListener;
    }

    public void noPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onCloseClick();
        }
        LogUtil.e("点击相册");
        dismiss();
    }

    public void okPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onConfirmClick();
        }
        LogUtil.e("点击照相");
        dismiss();
    }
}

